//
// Copyright (c) GapCoder
//

#pragma once

//TODO: Resolve what library BaseTsd.h is.
#include <BaseTsd.h>



#ifdef __cplusplus
extern "C"
{
#endif

	typedef bool				FXBool;
	typedef char				FXChar;
	typedef wchar_t				FXWChar;
	typedef int					FXInt;
	typedef unsigned int		FXUInt;
	typedef signed __int8		FXInt8;
	typedef signed __int16		FXInt16;
	typedef signed __int32		FXInt32;
	typedef signed __int64		FXInt64;
	typedef unsigned __int8		FXUInt8;
	typedef unsigned __int16	FXUInt16;
	typedef unsigned __int32	FXUInt32;
	typedef unsigned __int64	FXUInt64;
	typedef size_t				FXSize_t;
	typedef float				FXFloat;
	typedef double				FXDouble;

	typedef struct _FXString
	{
		int _len;
		char* _string;
	} FXString;

#pragma pack(push,1)
	typedef struct _FXRateInfo
	{
		FXUInt _ctm;
		FXDouble _open;
		FXDouble _low;
		FXDouble _high;
		FXDouble _close;
		FXDouble _vol;
	} FXRateInfo;
#pragma pack(pop)

	typedef enum _FXAppliedPrice
	{
		PriceClose		= 0,	//Close bar price
		PriceOpen		= 1,	//Open bar price
		PriceHight		= 2,	//Hight bar price
		PriceLow		= 3,	//Low bar price
		//(high + low)/2 
		PriceMedian		= 4,
		//(high + low + close)/3
		PriceTypical	= 5,
		//(high + low + close + open)/4
		PriceWeighted	= 6,
		//Let the function decide what to do with prices.
		PriceDefault	= 255
	} FXAppliedPrice;

	typedef enum _FXRateItem
	{
		RateItemTime = 0,
		RateItemOpen = 1,
		RateItemLow = 2,
		RateItemHigh = 3,
		RateItemClose = 4,
		RateItemVolume = 5
	} FXRateItem;

	typedef enum _FXSymbol
	{
		EURUSD = 0,
		GBPUSD = 1,
		USDJPY = 2,
		AUDUSD = 3,
		USDCAD = 4
	} FXSymbol;

#ifdef __cplusplus
}
#endif /* ifdef __cplusplus */